<!--界面配置-->
<script setup>
import {onMounted, ref, watch} from "vue";
import {useStore} from "vuex";
import {themes} from "@/assets/js/Themes";

const store = useStore();
const setTheme = (theme) => store.commit("Config/setTheme", theme)

const theme = ref();

onMounted(() => {
  theme.value = store.state.Config.theme
})

watch(theme, (nv) => {
  store.commit('Config/setTheme', nv)
})

</script>

<template>
  <div>
    <div>
      <h4>界面主题</h4>
      <el-radio-group v-model="theme">
        <el-radio-button v-for="{label,value} in themes" :label="value">{{ label }}</el-radio-button>
      </el-radio-group>
    </div>
  </div>
</template>

<style scoped>

</style>